! function() {
	var e;
	try {
		var t = null;

		function Qe(e) {
			if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
			return e
		}

		function Ze(e, t) {
			if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
		}

		function et(e, t) {
			for (var n = 0; n < t.length; n++) {
				var r = t[n];
				r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object
					.defineProperty(e, r.key, r)
			}
		}

		function tt(e, t) {
			return tt = Object.setPrototypeOf || function(e, t) {
				return e.__proto__ = t, e
			}, tt(e, t)
		}

		function nt(e, t) {
			if ("function" != typeof t && null !== t) throw new TypeError(
				"Super expression must either be null or a function");
			e.prototype = Object.create(t && t.prototype, {
				constructor: {
					value: e,
					writable: !0,
					configurable: !0
				}
			}), t && tt(e, t)
		}

		function rt(e, t) {
			return !t || "object" != ((n = t) && "undefined" != typeof Symbol && n.constructor === Symbol ? "symbol" :
				typeof n) && "function" != typeof t ? Qe(e) : t;
			var n
		}

		function ot() {
			if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
			if (Reflect.construct.sham) return !1;
			if ("function" == typeof Proxy) return !0;
			try {
				return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
			} catch (e) {
				return !1
			}
		}

		function it(e, t, n) {
			return it = ot() ? Reflect.construct : function(e, t, n) {
				var r = [null];
				r.push.apply(r, t);
				var o = new(Function.bind.apply(e, r));
				return n && tt(o, n.prototype), o
			}, it.apply(null, arguments)
		}

		function at(e) {
			return at = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
				return e.__proto__ || Object.getPrototypeOf(e)
			}, at(e)
		}

		function ct(e) {
			var n = "function" == typeof t ? new t : void 0;
			return ct = function(e) {
				if (null === e || (t = e, -1 === Function.toString.call(t).indexOf("[native code]"))) return e;
				var t;
				if ("function" != typeof e) throw new TypeError(
					"Super expression must either be null or a function");
				if (void 0 !== n) {
					if (n.has(e)) return n.get(e);
					n.set(e, r)
				}

				function r() {
					return it(e, arguments, at(this).constructor)
				}
				return r.prototype = Object.create(e.prototype, {
					constructor: {
						value: r,
						enumerable: !1,
						writable: !0,
						configurable: !0
					}
				}), tt(r, e)
			}, ct(e)
		}
		var n = window.encodeURIComponent;

		function ut(e) {
			return e
		}

		function st() {
			return Math.random().toString(36).slice(2)
		}
		var r, o = ut("240313-205626-237"),
			i = ut("wwopendata.web"),
			a = ut(""),
			c = ut(""),
			u = ut("lu0mbbjv.H_8RirdAGtvuhSBHxMKIh3VI1UBtZRNqUTpVWHDZ3ELM"),
			s = ut("".concat(i, "@").concat(o)),
			l = location.origin || "".concat(location.protocol, "//").concat(location.host),
			f = "https://open.work.weixin.qq.com",
			d = "".concat(f, "/wwopen/openData/frame/index#origin=").concat(n(l)),
			p = "bRLDot6R4Kymzz0jPO",
			v = "https://aegis.qq.com/collect",
			g = 2,
			h = 4,
			w = [],
			y = u;

		function lt(e) {
			w.unshift({
				level: g,
				msg: e
			})
		}

		function ft(e) {
			w.unshift({
				level: g,
				msg: e
			}), pt()
		}

		function dt(e) {
			w.unshift({
				level: h,
				msg: e
			}), pt()
		}

		function pt() {
			r || (r = setTimeout(vt, 10))
		}

		function vt() {
			r = void 0, 0 !== w.length && (gt("".concat(v, "?id=").concat(p) + "&from=".concat(l) + "&sessionId="
				.concat(n(y)) + "&version=".concat(n(s)), w.reverse()), w = [])
		}

		function gt(e, t) {
			var r = new XMLHttpRequest;
			"withCredentials" in r || (r = new XDomainRequest);
			for (var o = [], i = t.length, a = 0; a < i; a++) o.push(["msg[".concat(a, "]=").concat(n(t[a].msg)),
				"level[".concat(a, "]=").concat(t[a].level)
			].join("&"));
			o.push("count=".concat(i)), r.open("POST", e), r.setRequestHeader("Content-type",
				"application/x-www-form-urlencoded"), r.send(o.join("&"))
		}
		var m = {};

		function ht(e, t) {
			wt(e, (function e(n) {
				yt("name", e), t(n)
			}))
		}

		function wt(e, t) {
			bt(m, e) || (m[e] = []), m[e].push(t)
		}

		function yt(e, t) {
			if (bt(m, e)) {
				var n = m[e],
					r = n.indexOf(t);
				r >= 0 && n.splice(r, 1)
			}
		}

		function mt(e, t) {
			var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
			if (bt(m, e))
				if (n) {
					var r = {
						type: e,
						detail: t
					};
					m[e].forEach((function(t) {
						try {
							t(r)
						} catch (t) {
							console.log("[event] ".concat(e, " error: ").concat(t))
						}
					}))
				} else mt(e, t, !0)
		}

		function bt(e, t) {
			return Object.prototype.hasOwnProperty.call(e, t)
		}

		function Ot(e, t) {
			return function() {
				for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
				try {
					return t.apply(this, r)
				} catch (t) {
					Et(t, e), mt("error", t)
				}
			}
		}
		e = {
			captureException: Et
		};
		var b = St(lt),
			O = St(ft),
			A = St(dt);

		function At(e) {
			lt(e), vt()
		}

		function Et(e, t) {
			dt("[".concat(t, "] ").concat(Ct(e)))
		}

		function St(e) {
			return function() {
				for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
				for (var o = [], i = 0, a = n.length; i < a; i++) o.push(_t(n[i]));
				e(o.join(" "))
			}
		}

		function _t(e) {
			return e ? "object" != typeof e ? e : "string" == typeof e.stack ? Ct(e) : JSON.stringify(e) : e
		}

		function Ct(e) {
			return "".concat(e, " ").concat(e.stack)
		}
		var E = Object.freeze({
			__proto__: null,
			captureException: Et,
			captureMessage: At,
			error: A,
			log: b,
			warn: O,
			wrap: Ot
		});

		function jt(e, t) {
			(null == t || t > e.length) && (t = e.length);
			for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
			return r
		}

		function kt(e) {
			if (Array.isArray(e)) return jt(e)
		}

		function xt(e) {
			if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array
				.from(e)
		}

		function Dt() {
			throw new TypeError(
				"Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
				)
		}

		function Mt(e, t) {
			if (e) {
				if ("string" == typeof e) return jt(e, t);
				var n = Object.prototype.toString.call(e).slice(8, -1);
				return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array
					.from(n) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? jt(e, t) :
					void 0
			}
		}

		function Tt(e) {
			return kt(e) || xt(e) || Mt(e) || Dt()
		}
		var S = "[ww-open-data]";

		function Nt() {
			for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]
		}

		function Pt() {
			for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
			var r;
			(r = E).log.apply(r, Tt(t))
		}

		function Rt() {
			for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
			var r;
			(r = E).warn.apply(r, Tt(t))
		}

		function It() {
			for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
			var r;
			(r = E).error.apply(r, Tt(t))
		}

		function Wt() {
			for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
			var r, o;
			(r = console).error.apply(r, [S].concat(Tt(t))), (o = E).error.apply(o, Tt(t))
		}
		var _ = Function.prototype.call;

		function Ft() {
			var e = {
					Math: window.Math,
					Number: window.Number,
					JSON: window.JSON,
					Promise: window.Promise,
					Uint8Array: window.Uint8Array,
					Function: window.Function,
					Object: window.Object,
					Array: window.Array,
					String: window.String,
					WeakMap: window.WeakMap,
					Element: window.Element,
					ShadowRoot: window.ShadowRoot,
					Image: window.Image,
					Node: window.Node,
					EventTarget: window.EventTarget,
					HTMLIFrameElement: window.HTMLIFrameElement,
					CanvasRenderingContext2D: window.CanvasRenderingContext2D
				},
				t = {
					fetch: window.fetch,
					parseInt: window.parseInt,
					setTimeout: window.setTimeout
				},
				n = Object.create(null);
			return Lt(n, "protected", Object.create(null)), Lt(n, "singleton", Object.create(null)), Object.keys(e)
				.forEach((function(t) {
					e[t] && (Lt(n.singleton, t, e[t]), Lt(n.protected, t, qt(e[t])), e[t].prototype && (Lt(n
						.protected[t], "prototype", qt(e[t].prototype)), Object.freeze(n.protected[
						t].prototype)), Object.freeze(n.protected[t]))
				})), Object.keys(t).forEach((function(e) {
					Lt(n.singleton, e, t[e])
				})), Lt(n.singleton, "call", _.bind(_)), Object.defineProperty(n, "__version__", {
					value: s
				}), Object.freeze(n.protected), Object.freeze(n.singleton), Object.freeze(n), n
		}

		function qt(e) {
			var t = Object.create(null);
			return Object.getOwnPropertyNames(e).forEach((function(n) {
				if ("prototype" !== n) {
					var r = Object.getOwnPropertyDescriptor(e, n),
						o = Object.create(null);
					Lt(o, "value", r.value), Lt(o, "get", r.get), Lt(o, "set", r.set), Lt(t, n, Object
						.freeze(o))
				}
			})), t
		}

		function Lt(e, t, n) {
			Object.defineProperty(e, t, {
				value: n,
				enumerable: !0
			})
		}
		var C = Ft(),
			j = null == C ? void 0 : C.protected,
			k = null == C ? void 0 : C.singleton,
			x = (null == k ? void 0 : k.call) || Function.prototype.call.bind(Function.prototype.call),
			D = Ut(j, "Function.prototype.bind"),
			M = Ut(j, "Function.prototype.call"),
			T = function(e) {
				return e && x(D, M, e)
			};
		Ut(j, "Object.keys");
		var N = Ut(j, "Object.defineProperty"),
			P = Ut(k, "setTimeout", "direct"),
			R = T(Ut(j, "Object.prototype.hasOwnProperty")),
			I = T(Ut(j, "Array.prototype.push")),
			W = T(Ut(j, "Array.prototype.forEach")),
			F = T(Ut(j, "Array.prototype.slice"));
		T(Ut(j, "Math.random")), T(Ut(j, "Number.prototype.toString"));
		var q = T(Ut(j, "String.prototype.indexOf")),
			L = T(Ut(j, "String.prototype.slice")),
			U = Ut(k, "Image", "direct"),
			z = T(Ut(j, "Image.prototype.src", "set")) || T(Ut(j, "HTMLImageElement.prototype.src", "set")) || function(
				e, t) {
				e.src = t
			},
			H = T(Ut(j, "HTMLIframeElement.prototype.contentWindow", "get")) || function(e) {
				return e.contentWindow
			},
			J = T(Ut(j, "HTMLIframeElement.prototype.contentDocument", "get")) || function(e) {
				return e.contentDocument
			},
			B = T(Ut(j, "EventTarget.prototype.addEventListener")) || function(e, t, n) {
				e.addEventListener(t, n)
			},
			V = T(Ut(j, "CanvasRenderingContext2D.prototype.fillText")),
			X = T(Ut(j, "CanvasRenderingContext2D.prototype.drawImage")),
			G = T(Ut(j, "CanvasRenderingContext2D.prototype.strokeText")),
			K = T(Ut(j, "CanvasRenderingContext2D.prototype.measureText")),
			Y = Ut(k, "WeakMap", "direct"),
			$ = T(Ut(j, "WeakMap.prototype.get")),
			Q = T(Ut(j, "WeakMap.prototype.set")),
			Z = T(Ut(j, "Element.prototype.attachShadow")),
			ee = T(Ut(j, "Node.prototype.textContent", "set"));

		function Ut(e, t) {
			var n, r, o, i, a, c = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "value",
				u = (null == j || null === (n = j.String) || void 0 === n ? void 0 : n.prototype.split.value) || window
				.String.prototype.split,
				s = (null == j || null === (r = j.Array) || void 0 === r ? void 0 : r.prototype.pop.value) || window
				.Array.prototype.pop,
				l = (null == j || null === (o = j.Array) || void 0 === o ? void 0 : o.prototype.forEach.value) || window
				.Array.prototype.forEach,
				f = (null == j || null === (i = j.Object) || void 0 === i ? void 0 : i.getOwnPropertyDescriptor
				.value) || Object.getOwnPropertyDescriptor,
				d = x(u, t, "."),
				p = x(s, d),
				v = e,
				g = window;
			if (x(l, d, (function(e) {
					v && (v = v[e]), g && (g = g[e])
				})), null == v ? void 0 : v[p]) {
				if (v = v[p], "direct" === c) return v;
				if (v[c]) return v[c]
			}
			if (g) return "direct" === c || "value" === c ? g[p] : null === (a = f(g, p)) || void 0 === a ? void 0 : a[
				c]
		}
		var te = new U,
			ne = !1,
			re = null,
			oe = [];

		function zt(e) {
			ne ? e() : re ? e(re) : oe.push(e)
		}

		function Ht() {
			var e = oe;
			oe = [], W(e, (function(e) {
				e(re)
			}))
		}

		function Jt(e, t) {
			if (R(e, t)) return e[t]
		}

		function Bt(e, t, n) {
			N(e, t, {
				value: n,
				writable: !0,
				enumerable: !0,
				configurable: !0
			})
		}
		B(te, "load", (function() {
			ne = !0, P(Ht, 1)
		})), B(te, "error", (function() {
			re = new Error("Failed to load crossorigin image"), P(Ht, 1)
		})), z(te, "https://wwcdn.weixin.qq.com/node/wework/images/1x1-00000000.91e42db1c6.png");
		var ie = "\ufeff",
			ae = String.fromCharCode(8204),
			ce = String.fromCharCode(8205),
			ue = String.fromCharCode(8203),
			se = [String.fromCharCode(8206), String.fromCharCode(8207), ae, ce, ue],
			le = {},
			fe = 0;

		function Vt(e) {
			var t = Jt(e, "encrypt_token");
			if (t) return t;
			var n = Jt(e, "data"),
				r = Jt(e, "encrypt_text_data");
			if (n && r) {
				for (var o = (fe++).toString(5), i = "", a = 0, c = o.length; a < c; a++) i += se[Number(o[a])];
				var u = ie + r + i + ie;
				return Bt(le, u, n), Bt(e, "encrypt_token", u), u
			}
		}

		function Xt(e) {
			var t = q(e, ie, 0);
			if (-1 === t) return e;
			for (var n = L(e, 0, t); - 1 !== t;) {
				var r = q(e, ie, t + 1);
				if (-1 === r) break;
				var o = Jt(le, L(e, t, r + 1));
				o ? (n += o, t = r + 1) : (n += L(e, t, r), t = r)
			}
			return n + L(e, t)
		}
		var de = Y && new Y,
			pe = !1,
			ve = !1;

		function Gt() {
			var e;
			if (pe) return !0;
			var t = null === (e = window.CanvasRenderingContext2D) || void 0 === e ? void 0 : e.prototype;
			return !!t && (t.strokeText = function(e, t, n, r) {
				if (!ne) return null == r ? G(this, e, t, n) : G(this, e, t, n, r);
				var o = Xt(e);
				return o !== e && $t(this), null == r ? G(this, o, t, n) : G(this, o, t, n, r)
			}, t.fillText = function(e, t, n, r) {
				if (!ne) return null == r ? V(this, e, t, n) : V(this, e, t, n, r);
				var o = Xt(e);
				return o !== e && $t(this), null == r ? V(this, o, t, n) : V(this, o, t, n, r)
			}, t.measureText = function(e) {
				return K(this, ne ? Xt(e) : e)
			}, pe = !0, !0)
		}

		function Kt() {
			Rt("enable canvas sharing"), ve = !0
		}

		function Yt() {
			ve = !1
		}

		function $t(e) {
			$(de, e) || (ve || X(e, te, 0, 0), Q(de, e, !0))
		}
		var ge = {};

		function Qt(e, t, n) {
			return "".concat(e, "::").concat(t, "::").concat(n || "")
		}

		function Zt(e) {
			return Qt(Jt(e, "type"), Jt(e, "id"), Jt(e, "corpid"))
		}

		function en(e) {
			return Jt(ge, e)
		}
		var he = st(),
			we = 1,
			ye = {},
			me = {},
			be = {};

		function tn(e, t) {
			var n = "".concat(he, ".").concat(we++),
				r = [],
				o = {},
				i = 0;
			if (W(e, (function(e) {
					var t = Jt(e, "type"),
						a = Jt(e, "id");
					if (t && a) {
						var c = Qt(t, a, Jt(e, "corpid"));
						en(c) || R(o, c) || (Bt(o, c, !0), i += 1, R(ye, c) ? I(Jt(ye, c), n) : (Bt(ye, c, [n]),
							I(r, e)))
					}
				})), i) return Bt(be, n, i), Bt(me, n, t), r;
			t()
		}

		function nn(e, t) {
			if (!e) return It("[callback] missing response"), void rn(t, new Error("missing response data"));
			var n = Jt(e, "items");
			if (!n) return It("[callback] missing items"), void rn(t, new Error("missing response items"));
			W(n, (function(e) {
				var t;
				t = Zt(e), Bt(ge, t, e)
			}));
			var r = [];
			W(t, (function(e) {
				var t = Zt(e);
				if (en(t)) {
					var n = Jt(ye, t);
					n && (delete ye[t], W(n, (function(e) {
						var t = Jt(me, e);
						if (t) {
							var n = Jt(be, e) - 1;
							n > 0 ? Bt(be, e, n) : (delete be[e], delete me[e], t())
						}
					})))
				} else I(r, e)
			})), r.length > 0 && rn(r, new Error("missing items"))
		}

		function rn(e, t) {
			W(e, (function(e) {
				var n = Zt(e),
					r = Jt(ye, n);
				r && (delete ye[n], W(r, (function(e) {
					var n = Jt(me, e);
					delete be[e], delete me[e], n && n(t)
				})))
			}))
		}

		function on(e) {
			for (var t = Ut(j, "JSON.parse"), n = Ut(k, "Uint8Array", "direct"), r = Ut(j, "String.fromCodePoint"), o =
					r, i = new n(e), a = "", c = 0, u = i.length; c < u;) {
				var s = i[c++];
				if (s <= 127) a += o(s);
				else {
					var l = 63 & i[c++];
					if (s <= 223) a += o((31 & s) << 6 | l);
					else {
						var f = 63 & i[c++];
						if (s <= 239) a += o((15 & s) << 12 | l << 6 | f);
						else {
							var d = 63 & i[c++];
							r ? a += o((7 & s) << 18 | l << 12 | f << 6 | d) : (a += o(63), c += 3)
						}
					}
				}
			}
			return t(a)
		}

		function an(e) {
			for (var t = Ut(k, "Uint8Array", "direct"), n = Ut(k, "parseInt", "direct"), r = T(Ut(j,
					"String.prototype.substring")), o = new t(e.length / 2), i = 0, a = e.length; i < a; i += 2) o[i /
				2] = n(r(e, i, i + 2), 16);
			return o
		}
		var Oe, Ae, Ee, Se = {
				skey: null
			},
			_e = (null === (Oe = window.crypto) || void 0 === Oe ? void 0 : Oe.subtle) || (null === (Ae = window
				.crypto) || void 0 === Ae ? void 0 : Ae.webkitSubtle);

		function cn(e, t, n, r) {
			sn(e, t, n, r, !0)
		}

		function un(e, t, n, r) {
			sn(e, t, n, r, !1)
		}

		function sn(e, t, n, r) {
			var o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4];
			if (window.fetch) window.fetch(e, {
				method: "POST",
				credentials: "include",
				headers: {
					"Content-Type": "application/json"
				},
				body: JSON.stringify(t)
			}).then((function(e) {
				if (200 === e.status) return o ? e.arrayBuffer() : e.json();
				var t = "Invalid response status ".concat(e.status);
				return e.json().catch((function() {
					throw new Error(t)
				})).then((function(e) {
					throw (null == e ? void 0 : e.result) ? null == e ? void 0 : e.result :
						new Error(t)
				}))
			})).then(n, r);
			else {
				var i = new XMLHttpRequest;
				i.open("POST", e), i.withCredentials = !0, o && (i.responseType = "arraybuffer"), i.setRequestHeader(
					"Content-Type", "application/json"), i.onreadystatechange = function() {
					if (i.readyState === XMLHttpRequest.DONE)
						if (200 === i.status)
							if (o) n(i.response);
							else try {
								n(JSON.parse(i.responseText))
							} catch (e) {
								r(new Error("Parse response error"))
							} else r(new Error("Invalid response status ".concat(i.status)))
				}, i.onerror = function() {
					r(new Error("Request error"))
				}, i.send(JSON.stringify(t))
			}
		}

		function ln(e) {
			var t = function(t) {
				It("[fetchData] fetch fail #".concat(n, " (").concat(n, ")"), t), rn(e, {
					errMsg: "wwapp.fetchOpenData:fail",
					rand: n,
					detail: t
				})
			};
			if (!a) return It("[fetchData] missing referer"), void rn(e, {
				errMsg: "wwapp.fetchOpenData:fail",
				hint: "Missing referer for jwxwork.js. See: https://developer.work.weixin.qq.com/document/path/91958"
			});
			var n = st(),
				r = "".concat(f, "/wwopen/openData/getOpenData?f=json&r=").concat(n);
			Pt("[fetchData] begin #".concat(n));
			var o = Ee || (Ee = _e.importKey("raw", an(a), "AES-CBC", !1, ["decrypt"]));
			cn(r, {
				items: e,
				skey: Se.skey,
				sid: c
			}, (function(r) {
				Pt("[fetchData] fetch res #".concat(n)), o.then((function(e) {
					return _e.decrypt({
						name: "AES-CBC",
						iv: new Uint8Array(16)
					}, e, r)
				})).then(on).then((function(t) {
					Pt("[fetchData] fetch parsed #".concat(n)), nn(t, e)
				})).catch(t)
			}), t)
		}

		function fn(e, t, n) {
			var r = null;
			try {
				r = J(e)
			} catch (e) {}
			if (null !== r) throw new Error("Missing cross origin");
			Nt("[iframe] postMessage", e, t, n), H(e).postMessage(t, n)
		}
		var Ce, je = {},
			ke = st(),
			xe = 0;

		function dn(e) {
			var t = "".concat(ke, ".").concat(st(), ".").concat(xe++);
			return Bt(je, t, e), t
		}

		function pn(e) {
			delete je[e]
		}
		st(),
			function(e) {
				e[e.OPEN_DATA_NAME = 0] = "OPEN_DATA_NAME", e[e.OPEN_DATA_LOGIN_SID = 1] = "OPEN_DATA_LOGIN_SID"
			}(Ce || (Ce = {}));
		var De, Me = 1e3,
			Te = 20,
			Ne = [];

		function vn(e, t) {
			var n = tn(e, t);
			n && (W(n, (function(e) {
				I(Ne, e)
			})), !De && Ne.length && (De = P(Ot("flush-fetch", gn), Te)))
		}

		function gn() {
			var e = Ne;
			De = void 0, Ne = [];
			for (var t = e.length, n = 0; n < t; n += Me) {
				ln(F(e, n, n + Me))
			}
		}
		var Pe;
		! function(e) {
			e[e.loading = 1] = "loading", e[e.ready = 2] = "ready", e[e.error = 3] = "error"
		}(Pe || (Pe = {}));
		var Re, Ie, We = function() {
				function e() {
					var t = this;
					Ze(this, e), this.iframe = document.createElement("iframe"), this.state = Pe.loading, this
						.queue = [], this.iframe.onload = Ot("MainFrame.onload", (function() {
							Pt("[MainFrame] onload"), t.state = Pe.ready, t.fetchData()
						})), this.iframe.onerror = function(e) {
							Et((null == e ? void 0 : e.error) || new Error("MainFrame load error"),
								"MainFrame.onerror"), t.state = Pe.error
						}, this.iframe.style.display = "none", this.iframe.referrerPolicy = "origin", this.iframe.src =
						d
				}
				var t = e.prototype;
				return t.enqueueFetch = function(e) {
					var t = this;
					this.queue.push(e), this.timer || (this.timer = P(Ot("MainFrame.timeout", (function() {
						t.state === Pe.ready && t.fetchData()
					})), 20))
				}, t.fetchData = function() {
					var e = {},
						t = [];
					this.queue.forEach((function(n) {
						var r = "".concat(n.type, "::").concat(n.id, "::").concat(n.corpid || "");
						e[r] || (e[r] = !0, t.push(n))
					})), t.length && (this.timer = void 0, this.queue = [], Pt("[MainFrame] fetchData"), fn(this
						.iframe, JSON.stringify({
							type: "fetch",
							items: t,
							skey: Se.skey,
							sid: c
						}), f))
				}, e
			}(),
			Fe = ["fontFamily", "fontSize", "fontWeight", "fontStyle", "fontVariant", "fontStretch", "fontSizeAdjust",
				"color", "cursor"
			];
		! function(e) {
			e[e.pending = 1] = "pending", e[e.ready = 2] = "ready", e[e.error = 3] = "error", e[e.loading = 4] =
				"loading"
		}(Re || (Re = {})),
		function(e) {
			e[e.empty = 1] = "empty", e[e.frame = 2] = "frame"
		}(Ie || (Ie = {}));
		var qe = function() {
				function e(t, n) {
					Ze(this, e), this.container = t, this.mainFrame = n, this.renderType = Ie.empty, this.loadState = Re
						.pending
				}
				var t = e.prototype;
				return t.update = function() {
					var e = this.getItem();
					if (!e.type || !e.id) return this.renderEmpty();
					this.renderText(e)
				}, t.renderEmpty = function() {
					this.setChild(Ie.empty)
				}, t.renderText = function(e) {
					var t = this;
					if (this.renderType !== Ie.frame || this.loadState === Re.error) {
						var r = document.createElement("iframe");
						r.onload = Ot("Frame.onload", (function() {
							t.renderEl === r && (t.loadState = Re.ready, t.notifyUpdate())
						})), r.onerror = function(e) {
							t.renderEl === r && (Et((null == e ? void 0 : e.error) || new Error(
								"Frame load error"), "Frame.onerror"), t.loadState = Re.error)
						};
						var o = n("".concat(e.type, "::").concat(e.id, "::").concat(e.corpid || ""));
						r.frameBorder = "0", r.referrerPolicy = "origin", r.src = "".concat(d, "&init=").concat(o),
							this.loadState = Re.loading, this.setChild(Ie.frame, r)
					}
					this.mainFrame.enqueueFetch(e), this.loadState === Re.ready && this.notifyUpdate(e)
				}, t.setChild = function(e, t) {
					for (var n = this.container; n.firstChild;) n.removeChild(n.firstChild);
					t && n.appendChild(t), this.renderEl = t, this.renderType = e
				}, t.getItem = function() {
					return {
						type: this.container.getAttribute("type"),
						id: this.container.getAttribute("openid"),
						corpid: this.container.getAttribute("corpid") || void 0
					}
				}, t.notifyUpdate = function() {
					var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.getItem();
					if (e.type && e.id) {
						var t = {},
							n = getComputedStyle(this.container);
						Fe.forEach((function(e) {
							t[e] = n[e]
						})), fn(this.renderEl, JSON.stringify({
							type: "update",
							item: e,
							style: t
						}), f)
					}
				}, e
			}(),
			Le = {
				"ww.opendata.event": function(e, t) {
					var n;
					"click" === e.eventType && (null === (n = t.parentNode) || void 0 === n || n.click())
				},
				"ww.opendata.resize": function(e, t) {
					var n = e.size;
					t.style.width = n.width, t.style.height = n.height, mt("update", {
						el: t.parentNode,
						hasData: !!n.width
					})
				}
			};

		function hn(e) {
			if (e.origin === f) {
				var t;
				try {
					t = JSON.parse(e.data)
				} catch (e) {}
				t && Le[t.type] && W(document.querySelectorAll("ww-open-data iframe"), (function(n) {
					n.contentWindow === e.source && Le[t.type](t, n)
				}))
			}
		}
		var Ue, ze, He = "__WW_OPENDATA_RENDER__";

		function wn() {
			window.addEventListener ? window.addEventListener("message", Ot("dispatchMessage", hn)) : window
				.attachEvent("onmessage", Ot("dispatchMessage", hn));
			var e = document.querySelector("head");
			ze = document.createElement("style"), e.appendChild(ze), Ue = new We, e.appendChild(Ue.iframe);
			var t = ze.sheet;
			t.insertRule("ww-open-data { display: inline-block; vertical-align: text-bottom; overflow: hidden }", 0), t
				.insertRule("ww-open-data img { display: block; width: 100%; height: 100% }", 1), t.insertRule(
					"ww-open-data iframe { display: block; width: 0; height: 0 }", 2)
		}

		function yn(e) {
			if (e) {
				var t = e;
				t[He] || (t[He] = new qe(e, Ue)), t[He].update()
			}
		}

		function mn(e) {
			W(e, yn)
		}
		var Je = Y && new Y;

		function bn(e) {
			var t = $(Je, e);
			if (t) return t;
			try {
				var n = Z(e, {
					mode: "closed"
				});
				return Q(Je, e, n), n
			} catch (t) {
				It("[getShadow] fail", e, t)
			}
		}

		function On(e) {
			Nt("[bindAll] begin", e), W(e, An), Nt("[bindAll] end")
		}

		function An(e) {
			if (!En(e, !0)) {
				Se.skey || (mt("error", {
					errMsg: "bind:fail",
					message: "missing agentConfig",
					element: e
				}), console.error(
					"[ww-open-data] 页面未完成 wx.agentConfig，请先完成 wx.agentConfig 再调用 WWOpenData.bind，后续将逐步下线未完成 wx.agentConfig 时调用 WWOpenData.bind 的支持"
					));
				var t = st();
				vn([{
					type: e.getAttribute("type"),
					id: e.getAttribute("openid"),
					corpid: e.getAttribute("corpid")
				}], Ot("bind-pending", (function(n) {
					if (n) return It("[bind] fetch error", t, n), void mt("error", {
						errMsg: "bind:fail",
						message: "fetch open-data fail",
						detail: n
					});
					En(e)
				})))
			}
		}

		function En(e) {
			var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
			if (!(null == e ? void 0 : e.getAttribute)) return mt("error", {
				errMsg: "bind:fail",
				message: "missing bind element",
				element: e
			}), !1;
			var n = e.getAttribute("type");
			if (!n) return mt("error", {
				errMsg: "bind:fail",
				message: "missing open-data type",
				element: e
			}), !1;
			var r = e.getAttribute("openid");
			if (!r) return mt("error", {
				errMsg: "bind:fail",
				message: "missing open-data openid",
				element: e
			}), !1;
			var o = e.getAttribute("corpid"),
				i = bn(e);
			if (!i) return mt("error", {
				errMsg: "bind:fail",
				message: "attach shadow fail",
				element: e
			}), !1;
			var a = en(Qt(n, r, o));
			if (!a) return t || mt("error", {
				errMsg: "bind:fail",
				message: "missing open-data item",
				element: e
			}), !1;
			var c = Jt(a, "data");
			return ee(i, c || ""), mt("update", {
				element: e,
				hasData: !!c
			}), !!c
		}
		var Be = 0;
		Z || (Be |= 1), _e || (Be |= 2), "http:" === document.location.protocol && (Be |= 4);
		var Ve, Xe = 0,
			Ge = navigator.userAgent;
		if (!(/miniProgram/i.test(Ge) || "miniprogram" === window.__wxjs_environment)) /wxwork/i.test(Ge) && (Xe |= 4),
			window.WeixinSandBox && (Xe |= 1), (null === (Ve = window.wx) || void 0 === Ve ? void 0 : Ve.agentConfig) &&
			(Xe |= 2);
		var Ke = Ot("bind", Be ? yn : An),
			Ye = Ot("bindAll", Be ? mn : On);

		function Sn() {
			Cn("checkSession", {
				sid: c
			}, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {})
		}

		function _n() {
			var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
			if (!(e.corpid && e.agentid && e.timestamp && e.nonceStr && e.signature && e.jsApiList)) {
				var t, n, r = {
					err_Info: "fail",
					errMsg: "agentConfig:fail",
					hint: "Missing params"
				};
				return null === (t = e.fail) || void 0 === t || t.call(e, r), void(null === (n = e.complete) ||
					void 0 === n || n.call(e, r))
			}
			var o = {
				corpid: "".concat(e.corpid),
				agentid: "".concat(e.agentid),
				timestamp: "".concat(e.timestamp),
				nonceStr: "".concat(e.nonceStr),
				signature: "".concat(e.signature),
				jsApiList: e.jsApiList,
				url: location.href
			};
			Cn("agentConfig", {
				config: o,
				sid: c
			}, e, (function(e) {
				var t, n;
				Se.skey && (null === (t = e.data) || void 0 === t ? void 0 : t.skey) !== Se.skey && (
					ge = {}), Se.skey = null === (n = e.data) || void 0 === n ? void 0 : n.skey, Ye(
					document.querySelectorAll("ww-open-data")), Pt("[user config] #".concat(JSON
					.stringify(o)))
			}))
		}

		function Cn(e, t) {
			var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
				r = arguments.length > 3 ? arguments[3] : void 0,
				o = st();
			Pt("[invoke] ".concat(e, " begin #").concat(o)), un("".concat(f, "/wwopen/openData/").concat(e,
				"?f=json&r=").concat(o), t, (function(t) {
				var i, a, c, u, s = (null === (i = t.data) || void 0 === i ? void 0 : i.result) || t.data ||
				{
					errMsg: "".concat(e, ":fail")
				};
				s.errMsg === "".concat(e, ":ok") ? (Nt("[invoke] ".concat(e, " succ #").concat(o)), null ==
					r || r(t), null === (c = n.success) || void 0 === c || c.call(n, s)) : (It(
						"[invoke] ".concat(e, " fail #").concat(o), t), null === (u = n.fail) ||
					void 0 === u || u.call(n, s));
				null === (a = n.complete) || void 0 === a || a.call(n, s)
			}), (function(t) {
				var r, i;
				It("[invoke] ".concat(e, " fail #").concat(o), t);
				var a = {
					errMsg: "".concat(e, ":fail")
				};
				null === (r = n.fail) || void 0 === r || r.call(n, a), null === (i = n.complete) ||
					void 0 === i || i.call(n, a)
			}))
		}

		function jn(e, t) {
			var n = e.items;
			vn(n, (function(e) {
				if (e) return t(e);
				var r = [];
				W(n, (function(e) {
					var t = en(Zt(e));
					t && 1 === Jt(t, "datakind") && r.push({
						type: e.type,
						id: e.id,
						corpid: e.corpid,
						data: Vt(t)
					})
				})), zt((function(e) {
					e ? t(e) : t(null, {
						items: r
					})
				}))
			}))
		}

		function kn(e, t) {
			t(null, (function(e) {
				xn(e)
			}))
		}

		function xn(e, t) {
			fn(e, {
				type: "ww-open-data:inject-session",
				data: t
			}, arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "*")
		}
		if (Xe) Rt("skip inject", Xe);
		else {
			if (Be ? (Rt("inject iframe", Be), wn()) : Pt("inject begin", Be), a || Wt(
					"Missing referer for jwxwork.js. See: https://work.weixin.qq.com/api/doc/90001/90143/91958"), window
				.wx ? window.wx.agentConfig || Pt("define wx.agentConfig") : Rt("missing window.wx"), window.wx || (
					window.wx = {}), window.wx.agentConfig || N(window.wx, "agentConfig", {
					value: Ot("agentConfig", _n)
				}), window.WWOpenData) It("window.WWOpenData already exists");
			else {
				var $e = {};
				Dn($e, "bindAll", Ye), Dn($e, "bind", Ke), Dn($e, "on", wt), Dn($e, "once", ht), Dn($e, "off", yt), Dn(
					$e, "checkSession", Sn), Dn($e, "initCanvas", Gt), Dn($e, "enableCanvasSharing", Kt), Dn($e,
					"disableCanvasSharing", Yt), Dn($e, "prefetch", jn), Dn($e, "registerOpenFrame", Ot(
					"registerOpenFrame", dn)), Dn($e, "unregisterOpenFrame", Ot("unregisterOpenFrame", pn)), Dn($e,
					"createOpenSessionInjector", Ot("createOpenSessionInjector", kn)), N($e, "__version__", {
					value: s
				}), Dn($e, "agentConfig", Ot("agentConfig", _n)), Dn(window, "WWOpenData", $e), Pt(
					"window.WWOpenData defined", window.WWOpenData)
			}
			"customElements" in window && !customElements.get("ww-open-data") && Mn()
		}

		function Dn(e, t, n) {
			N(e, t, {
				value: n,
				enumerable: !0
			})
		}

		function Mn() {
			try {
				Pt("register custom element");
				var e = function(e) {
						e._current = {
							type: e.getAttribute("type"),
							id: e.getAttribute("openid"),
							corpid: e.getAttribute("corpid")
						}, e._current.type && e._current.id && Se.skey && Ke(e)
					},
					t = function(t) {
						nt(u, t);
						var n, r, o, i, a, c = (n = u, r = ot(), function() {
							var e, t = at(n);
							if (r) {
								var o = at(this).constructor;
								e = Reflect.construct(t, arguments, o)
							} else e = t.apply(this, arguments);
							return rt(this, e)
						});

						function u() {
							var t;
							return Ze(this, u), (t = c.call(this))._current = {}, t.getAttribute("type") && t
								.getAttribute("openid") ? (e(Qe(t)), t) : rt(t)
						}
						return u.prototype.attributeChangedCallback = function() {
							this._current.type === this.getAttribute("type") && this._current.id === this
								.getAttribute("openid") && this._current.corpid === this.getAttribute("corpid") ||
								e(this)
						}, o = u, a = [{
							key: "observedAttributes",
							get: function() {
								return ["type", "openid", "corpid"]
							}
						}], (i = null) && et(o.prototype, i), a && et(o, a), u
					}(ct(HTMLElement));
				customElements.define("ww-open-data", t)
			} catch (e) {
				Et(e, "register custom element")
			}
		}
	} catch (re) {
		e.captureException(re, "?")
	}
}();